<template>
    <div class="vanindexbar">
        <van-nav-bar
            title="列表"
            left-text="返回"
            right-text="按钮"
            left-arrow
            @click-left="$router.go(-1)"
        />
        <dl v-for="(item,index) in list" :key="index" @click="gotodeta(item)">
            <dt>
                <img :src="item.img" alt="">
            </dt>
            <dd>
                {{item.title}}
            </dd>
        </dl>
    </div>
</template>

<script>
export default {
    name: 'vanindexbar',

    data() {
        return {
            list: [],
            newPyList: [],
        };
    },

    mounted() {
        
    },

    methods: {
        gotodeta(item){
            this.$router.push({
            path: "/detail",
            query: {
            lister: item,
            },
        });
        }
    },
    created () {
        this.list = this.$route.query.item
        console.log(this.list);
    }
};
</script>

<style lang="scss" scoped>
dl{
    display: flex;
    width: 100%;
    height: 60px;
    line-height: 60px;
}
</style>